package com.zyf.controller;

import com.zyf.Service.impl.UserServiceImpl;
import com.zyf.entity.User;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户类
 * @author zhaoYuFei
 */
@RestController
@RequestMapping("/user")
public class UserOauthController {
    @Resource
    private UserServiceImpl userService;
    @GetMapping("/getByUsername")
    public User getByUserName(@RequestParam("username") String username){
        return userService.getByUsername(username);
    }
}
